<%--
  Created by IntelliJ IDEA.
  User: zhy
  Date: 2020/8/27
  Time: 22:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>显示多个用户信息</title>
</head>
<body>
<button id="findUser" type="button">查看用户信息</button>
  <table border="1" width="500" style="display: none;">
      <tr>
          <th>用户姓名</th>
          <th>密码</th>
          <th>出生日期</th>
      </tr>

  </table>
<script type="text/javascript" src="js/jquery-1.8.3.js"></script>
<script type="text/javascript" >
    $("#findUser").click(function(){
        $.post("login1",function(data){
          for(var i=0;i<data.length;i++){
              var str="<tr><td>"+data[i].userName+"</td><td>"+data[i].password+"</td><td>"+data[i].birthday+"</td></tr>"
              $("table").append(str);
          }
           $("table").css("display","block");
        },"json")
    });
</script>
</body>
</html>
